﻿$(function () {
    $('.lang-picker select').val(Globalize.culture().name.toLowerCase());

    $(".lang-picker select").change(function () {

        var value = $('option:selected', this).val();
        if (value === Globalize.culture().name.toLowerCase())
            return false; // do nothing

        $.cookie("_culture", value, { expires: 365, path: '/' });
        window.location.reload(); // reload 
    });
});